import requests
from bs4 import BeautifulSoup

headers={'Cookie':'sessionid=womwbvbfaux72202aje118xnntax2d6m',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0'}
zip=[]
detail=1
while len(zip) < 30:
    url = f'https://login2.scrape.center/detail/{detail}'
    response = requests.get(url, headers=headers)
    soup = BeautifulSoup(response.text, 'lxml')
    
    名字 = soup.select_one('h2.m-b-sm').text.strip()
    简介 = soup.select_one('p').text.strip()
    zip.append({名字,简介})
    if len(zip) >= 30:
        break
    
    detail += 1

for 名字, 简介 in zip[:30]:
    print(f'{名字} ----简介 {简介}')